/*
 * Alloy Analyzer
 * Copyright (c) 2002 Massachusetts Institute of Technology
 *
 * The Alloy Analyzer is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * The Alloy Analyzer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Alloy Analyzer; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package alloy.api;

/**
 * Thrown by {@link AlloyRunner#translate} when the formula cannot be translated for
 * some reason.  Indicates not an internal program error, but the fact that the formula
 * contains something we cannot translate and that was not detected by earlier
 * semantic checks.  For example, a language feature that is parsed but not yet
 * translated.  Or, the scopes are too large, and we're running low on memory.
 * <p>
 * <em>Implementation note:</em> The actual translation error is indicated by {@link alloy.transl.TranslVisitor#translate}
 * throwing a {@link alloy.transl.TranslException}; this gets rethrown as
 * {@link TranslationException} by {@link AlloyRunner#translate}.  This allows
 * API users to deal only with {@link alloy.api} and not with anything in {@link alloy.transl},
 * and also allows {@link alloy.transl.TranslException} to be a {@link RuntimeException}
 * that can be thrown from a visitor, while allowing {@link AlloyRunner#translate}
 * to throw a checked exception {@link TranslationException} that has to be caught.
 */
public class TranslationException extends Exception {
    public TranslationException(String msg_) { super(msg_); }
}
 
